﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<MyMainSite.Models.Admin.ProjectsModel>" %>

<asp:Content ID="Content2" ContentPlaceHolderID="contentHeader" runat="server">

	<script type="text/javascript">

		$(document).ready(function () {

			$(".projects li").live("mouseenter", function () {

				$(this).addClass("ui-state-hover");
			});

			$(".projects li").live("mouseleave", function () {

				$(this).removeClass("ui-state-hover");
			});

			$(".projects li").live("click", function () {

				var projectid = $(this).data("projectid");

				window.location = "/admin/project/?projectId=" + projectid;
			});

			$("#buttonNewProject").click(function () {

				window.location = "/admin/newproject";
			});
		});

	</script>

</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Projects</h2>

	<nav>
        <ul class="projects ui-widget ui-helper-clearfix">

		<% foreach (var item in this.Model.Projects) { %>

			<li class="ui-state-default ui-corner-all" data-projectid="<%: item.ProjectId %>">
				<div class="title"><%: item.Name %></div>
				<div class="section">Developer Comments<br /><%: item.DeveloperComments.Count %></div>
				<div class="section">2</div>
				<div class="section">3</div>
				<div class="clear"></div>
			</li>
    
	    <% } %>

        </ul>
    </nav>

	<input type="button" value="New Project" id="buttonNewProject" />

</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="contentLeftMenu" runat="server">
</asp:Content>

